﻿using BattleNet.DataAccess.Parsers.Interface;
using BattleNet.Entities;
using BattleNet.WorldOfWarcraft.Modules;
using Ninject;

namespace BattleNet.WorldOfWarcraft
{
    public class RealmRetriever
    {
        
        private IKernel _kernel;
        public RealmRetriever(IKernel kernel)
        {
            _kernel = kernel;
        }

        public Realm GetRealm(Region region,string realmName)
        {
            Ninject.Parameters.Parameter regionParameter = new Ninject.Parameters.Parameter("Region", region, true);            
            return _kernel.Get<IRealmFinder>(regionParameter).Find(realmName);
        }
    }
}
